package com.liuwei.msmall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.liuwei.msmall.common.utils.PageUtils;
import com.liuwei.msmall.product.entity.AttrEntity;
import com.liuwei.msmall.product.entity.ProductAttrValueEntity;
import com.liuwei.msmall.product.vo.AttrVo;
import com.liuwei.msmall.product.vo.resp.AttrRespVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author llww
 * @email 2456888577@qq.com
 * @date 2021-02-25 17:45:01
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPage(String type, Long cateId, Map<String, Object> params);


    void saveDetail(AttrVo attr);

    List<AttrVo> getAttrInfoByIds(List<Long> attrIds);

    PageUtils getNoAttrRelationPage(List<Long> attrIds, Map<String, Object> params);

    AttrRespVo getAttrInfoById(Long attrId);

    void updateAttr(AttrVo attr);

    List<AttrVo> getAttrListByGroupId(Long attrGroupId);

    Map<Long, AttrEntity> getAttrInfoMapByIds(List<Long> attrIds);

    List<ProductAttrValueEntity> getBaseAtttrListBySpuId(Long spuId);

    void updateBaseAttrBySpuId(Long spuId,List<ProductAttrValueEntity> attrs);

    List<AttrEntity> getSearchAttrByIds(List<Long> attrids);

}

